using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class UpgradeMaxSpeed : UpgradeButton {

	protected override int CostForLevel() {
		return (int)(250 * Mathf.Pow(2, (gm.maxSpeed-10)/2));
	}

	override public void Clicked() {
		if(gm.score < CostForLevel())
			return;

		gm.score -= CostForLevel();

		gm.maxSpeed += 2;
	}

	override protected string UpgradeName() {
		return "Increase max speed to "+ (gm.maxSpeed + 2f).ToString("f0") +".";
	}

}
